package com.wanxi.product.service.api.feign;

import com.wanxi.product.service.api.result.CommonResult;
import com.wanxi.product.service.api.vo.shop.*;
import com.wanxi.product.service.api.query.shop.SkuQueryShop;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "product-server")
@RequestMapping("/shop")
public interface ProductShopService {
    /**
     * 获取sku列表
     * @param skuQuery
     * @return
     */
    @GetMapping("/sku/findAll")
    CommonResult<List<SkuFindAllOutVo>> findAllSku(@RequestBody SkuQueryShop skuQuery);


    /**
     * 根据id查找sku
     * @param skuId
     * @return
     */
    @GetMapping("/sku/findById")
    CommonResult<SkuFindByIdOutVo> findSkuById(@RequestParam(name = "skuId") Long skuId);

    /**
     * 商品上下架
     * @param skuShelvesInVo
     * @return
     */
    @PutMapping("/sku/shelve")
    CommonResult skuOnShelvesAndOffShelves(@RequestBody SkuShelvesInVo skuShelvesInVo);
}
